import api from '@/api';

export default {
  namespace: 'cabin',

  state: {

  },

  effects: {
    *queryCabins({ payload }, { call }) {
      return yield call(api.cabin.queryCabins, payload);
    },
    *deleteCabins({ payload }, { call }) {
      return yield call(api.cabin.deleteCabins, payload);
    },
    *queryImportResult({ payload }, { call }) {
      return yield call(api.cabin.queryImportResult, payload);
    },
    *saveImportResult({ payload }, { call }) {
      return yield call(api.cabin.saveImportResult, payload);
    },
  },

  reducers: {
    saveFixedList(state, { payload }) {
      return {
        ...state,
        fixedList: payload,
      };
    },
  },
};
